//
//  TabViewBoot.swift
//  SwiftUIWidgetDemo
//
//  Created by alanzhangg on 2023/7/17.
//

import SwiftUI

struct TabViewBoot: View {
    
    @State var selectedTab: Int = 0
    
    var body: some View {
        TabView(selection: $selectedTab){
            ZStack{
                Color.red.ignoresSafeArea()
                
            }
                .tabItem {
                    Image(systemName: "house.fill")
                }
                .tag(0)
            
            Text("Browse tab")
                .tabItem {
                    Label("browse", systemImage: "globe")
                        .foregroundStyle(.red
                        )
                }
                .tag(1)
            
            Text("profile Tab")
                .tabItem {
                    Image(systemName: "person.fill")
                        .foregroundStyle(.red)
                    Text("profile")
                        .foregroundStyle(.red)
                }
                .tag(2)
        }
        .tabViewStyle(.page)
    }
    
}

#Preview {
    TabViewBoot()
}
